'use strict';
angular.module('app.auth').controller('Carctrl', function ($scope, $location,$cookieStore, $http) {
    /*var a=0;
    var all=[];
    $scope.car_driver = function(){
        a++;
       var drivers_info = {};
        drivers_info.tele = $(".add_phone").val();
        drivers_info.name = $(".add_name").val();
        drivers_info.age = $(".add_age").val();
        drivers_info.wage = $(".add_wage").val();
        drivers_info.work_time = $(".add_work").val();
        if($(".repair_bot").src == "styles/img/car/car_add.png"){
            drivers_info.driver_pic = "";
        }else{
            drivers_info.driver_pic = $(".repair_bot").src;
        }

        all.push(drivers_info);
    }
    all = JSON.stringify(all);
    var op = {};
    op.cartype = $(".car_type ").val();
    op.create_time = $()*/


    // var sb = [
    //     {tele:'12',name:"刘荣昌",age:"22",wage:'21',work_time:"2017.2.2",driver_pic:"http://c.hiphotos.baidu.com/image/h%3D300/sign=37c0f1fc3501213fd03348dc64e636f8/fc1f4134970a304e9fcf65dfddc8a786c9175c22.jpg"},
    //     {tele:'321',name:"刘荣昌",age:"22",wage:'21',work_time:"2017.2.2",driver_pic:"http://c.hiphotos.baidu.com/image/h%3D300/sign=37c0f1fc3501213fd03348dc64e636f8/fc1f4134970a304e9fcf65dfddc8a786c9175c22.jpg"}];
    // sb = JSON.stringify(sb);
    // $scope.op = {cartype:"奔弛",create_time:"2018",rent_money:"222",terminal_num:"1111",car_num:"川A-0111",drivers_info:sb};
    //
    // $http.post(baseurl+'/add_car/carinfo',$scope.op).then(function(res){
    //
    //     console.log(res);
    //     if (res.data.ret == 1) {
    //         //$("#addModal").modal("hide");
    //         new Notify('success','添加成功');
    //         // $scope.select();
    //     }else if (res.data.ret != -1){
    //         new Notify('fail','用户已存在');
    //     }
    // });


})


//
// var obj = {page : 1 , rows : 8}
// obj.page += 1
// $http.post(baseurl+"/list2/select/carinfo",obj).then(function(res){
//     console.log(res.data);
// }) 展示接口

/*添加接口开始*/
//
// var sb = [
//     {tele:'12',name:"刘荣昌",age:"22",wage:'21',work_time:"2017.2.2",driver_pic:"http://c.hiphotos.baidu.com/image/h%3D300/sign=37c0f1fc3501213fd03348dc64e636f8/fc1f4134970a304e9fcf65dfddc8a786c9175c22.jpg"},
//     {tele:'321',name:"刘荣昌",age:"22",wage:'21',work_time:"2017.2.2",driver_pic:"http://c.hiphotos.baidu.com/image/h%3D300/sign=37c0f1fc3501213fd03348dc64e636f8/fc1f4134970a304e9fcf65dfddc8a786c9175c22.jpg"}];
// sb = JSON.stringify(sb);
// $scope.op = {cartype:"奔弛",create_time:"2018",rent_money:"222",terminal_num:"1111",car_num:"川A-0111",drivers_info:null};
// $http.post(baseurl+'/add_car/carinfo',$scope.op).then(function(res){
//
//     console.log(res);
//     if (res.data.ret == 1) {
//         //$("#addModal").modal("hide");
//         new Notify('success','添加成功');
//         // $scope.select();
//     }else if (res.data.ret != -1){
//         new Notify('fail','用户已存在');
//     }
// });
/*添加接口结束*/